<!--template放HTML script放JS style放CSS-->
<!--注意:script标签上必须得有setup属性-->
<template>
  <h1>我们的第一个Vue组件Component - 文本指令</h1>
  <p v-text="info"></p>
  <h3>{{info}}<</h3>
  <h4>{{info+"下午好"}}</h4>
  {{info}}
  <hr>
  <button @click="f">按钮</button>
  <hr>
  <p>{{count}}</p>
  <button @click="countadd">按钮</button>
  <hr>
  <p>{{x}}</p>
  <p v-text="x"></p>
  <p v-html="x"></p>
</template>

<script setup>
  import { ref} from 'vue'
  const info = ref('我是info');
  const f=()=>{
    console.log(info.value);
    info.value="我是新值!";
  }
  const count = ref(0);
  const countadd=()=>{
    count.value++;
  }
  const x=ref('今天是星期三，今天晚上有<mark>流星雨</mark>')
</script>

<style scoped>

</style>